package com.xxxx.service;

import com.xxxx.pojo.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

@FeignClient("service-provider")
public interface ProductService {

	@GetMapping("/product/list")
	List<Product> selectP();

	@GetMapping("/product/{id}")
	Product selectById(@PathVariable("id") Integer id);

	@PostMapping("/product/save")
	Map<Object,Object> createP(@RequestBody Product product);

}
